import request from '@/utils/request'

// 查询出入库单据列表
export function listStockBill(query) {
  return request({
    url: '/goods/stockBill/list',
    method: 'get',
    params: query
  })
}

// 查询出入库单据详细
export function getStockBill(id) {
  return request({
    url: '/goods/stockBill/' + id,
    method: 'get'
  })
}

// 新增出入库单据
export function addStockBill(data) {
  return request({
    url: '/goods/stockBill',
    method: 'post',
    data: data
  })
}

// 修改出入库单据
export function updateStockBill(data) {
  return request({
    url: '/goods/stockBill',
    method: 'put',
    data: data
  })
}

// 删除出入库单据
export function delStockBill(id) {
  return request({
    url: '/goods/stockBill/' + id,
    method: 'delete'
  })
}

// 出入库明细
export function goodsStock(id) {
  return request({
    url: '/goods/stockBill/goodsStock?id=' + id,
    method: 'get',
  })
}
